class Bonus {
public:
    int getMost(vector<vector<int> > board) {
        vector<vector<int>> dp(6, vector<int>(6, 0));
        dp[0][0] = board[0][0];
        for (int i = 0; i < 6; ++i)
        {
            for (int j = 0; j < 6; ++j)
            {
                if (i == 0 && j == 0)
                    continue;
                if (i == 0)
                    dp[i][j] = dp[i][j - 1] + board[i][j];
                else if (j == 0)
                    dp[i][j] = dp[i - 1][j] + board[i][j];
                else
                    dp[i][j] = max(dp[i - 1][j], dp[i][j - 1]) + board[i][j];
            }
        }
        return dp[5][5];
    }
};